The disclosed embodiments of the present invention relate to image compression and decompression, and more particularly, to an image compression method and apparatus for encoding pixel data of one or more than one block into an interleaved bit-stream and related image decompression method and apparatus.
A conventional image compression scheme may partition a frame into a plurality of blocks, and uses each block as a compression unit to encode each block into a bit-stream. FIG. 1 is a diagram illustrating a bit-stream generated by encoding pixel data of one block according to the conventional image compression scheme. Suppose that each block BK includes N pixels, and the pixel data of each pixel include color channel data of different color channels (e.g., red channel R, green channel G, and blue channel B). As shown in FIG. 1, the 1st pixel has color channel data R1, B1, G1; the 2nd pixel has color channel data R2, B2, G2; the 3rd pixel has color channel data R3, B3, G3; and the Nth pixel has color channel data RN, BN, GN. The conventional image compression scheme encodes the pixel data of the block BK to generate a bit-stream BS composed of a plurality of bit-stream portions that are concatenated, where the bit-stream portions correspond to different color channels, and each of the bit-stream portions includes all encoded color channel data of the same color channel in the block BK. As shown in FIG. 1, one bit-stream portion is composed of encoded color channel data R1′-RN′ only, another bit-stream portion is composed of encoded color channel data G1′-GN′ only, and yet another bit-stream portion is composed of encoded color channel data B1′-BN′ only. When an image compressor at a transmitting end outputs the bit-stream shown in FIG. 1 to a receiving end, an image decompressor at the receiving end decodes the received bit-stream to reconstruct the pixel data of the block BK. As the bit-stream portions are concatenated, the bit-stream portions are decoded by the image decompressor one by one. As a result, the bit-stream portion composed of encoded color channel data G1′-GN′ has to be decoded after the bit-stream portion composed of encoded color channel data R1′-RN′ and the bit-stream portion composed of encoded color channel data G1′-GN′ have been decoded. Thus, the decoded pixel data of the 1st pixel is fully reconstructed when the encoded color channel data B1′ is decoded, the decoded pixel data of the 2nd pixel is fully reconstructed when the encoded color channel data B2′ is decoded, and so forth. The processing latency for obtaining decoded pixel data of one pixel is high, which results in degraded performance of the image decompressor. Besides, the receiving end requires a large data buffer to store all of the decoded color channel data obtained by decoding the encoded color channel data R1′-RN′ and G1′-GN′, which increases the hardware cost inevitably. To create the bit-stream BS shown in FIG. 1, the transmitting end also needs a large data buffer to store raw color channel data. Similarly, the buffer requirement and processing latency of the image compression are high.